﻿using Colover.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Colover.WebCore
{
    public partial class site : System.Web.UI.MasterPage
    {
        protected string ColorCss
        {
            get { return "<link rel=\"stylesheet\" type=\"text/css\" href=\"../css/huraga-red.css\"/>"; }
        }

        public WebsiteInfo CurrentSite
        {
            get
            {
                return new WebsiteInfo()
                {
                    Title = "四叶草",
                    Summary = "取次花丛懒回顾，半缘修道半缘君。",
                    Description = "取次花丛懒回顾，半缘修道半缘君。",
                    Keywords = "赵榕,四叶草,Windows Phone",
                    AdminEmail = "zhaorong@outlook.com",
                    CssStyle = ColorCss,
                    Startdate = DateTime.Now,
                    Logo = "../img/template_logo.png",
                    SiteOff = true
                };
            }
        }

        protected NoticeInfo Notice
        {
            get
            {
                return new NoticeInfo()
                {
                    Title = "新通知",
                    Content = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis erat dui, quis purus."
                };
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (CurrentSite.SiteOff)
            {
                Response.Redirect("~/error/siteoff.html");
            }
        }
    }
}